<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{'str_invoice_title'|translate}</title>
<base href="{$smarty.const.CONF_FULL_SHOP_URL}" />{*
<link rel="stylesheet" href="{$smarty.const.URL_CSS}/printforms.css"
	type="text/css" />*}
<style type="text/css">{literal}
@media screen {input,.noprint {display: inline;height: auto;} .printable{display: none;}}
@media print {input,.noprint {display: none;} .printable{display: inline;}}
body, td { font-family:Arial, Helvetica, sans-serif;}.printList { width:90%;  margin:30px auto;}.printList td { vertical-align:top;}h1 { margin:10px 0 0 0;}h4 { border-bottom:1px solid #ddd;margin:0; padding-bottom:10px; color:#666; font-size:11pt;}p { margin:0 0 0px 0;}.urllinks span { display:block; float:left; padding:0 5px 0 0;}.urllinks { zoom:1; overflow:hidden;}.strongtext {  font-weight:bold;}.middeltext { font-size:10pt;}.grey { background:#F7F7f7; padding:10px; margin:0 0 0 0; font-size:11pt;}.even { background:#F7F7f7;}.w1 { padding:0 10px 0 30px; text-align:right; width:1%; white-space:nowrap;}.w2 { text-align:right;padding:0 10px 0 0;width:83%}.invoiceHeader td { font-size:11pt;}.invoiceHeader td.invNum, .totalPrice { font-size:15pt; font-weight:bold; color:#000; padding:0 0 10px 0; line-height:15pt;}.invoiceDecsr { border-top:solid 1px #ddd; margin:15px 0 0 0;}.invoiceDecsr td { padding:5px; border-collapse:collapse; vertical-align:top; text-align:center;} .invoiceDecsr th { background:#f0f0f0; padding:5px;  font-weight:normal; font-size:11pt; }.invoiceDecsr td.lefttext, .invoiceDecsr th.lefttext { text-align:left;}.invoiceDecsr tr.total td { border-top:solid 1px #999; border-right:none;}.invoiceDecsr tr.total td.totalPrice { border:1px solid #999; background:#f0f0f0;width:20% }.centrtext {  text-align:center;}.greytext { color:#555; font-weight:bold;}.Footer { width:50%; margin:0 0 0 auto;}	{/literal}</style>
{if !$strict}
<script type="text/javascript">
var lang_strings = {literal}{{/literal}
	'edit_link':'{'print_form_edit_before_print'|translate}',
	'field_title':'{'print_form_edit_title'|translate}',
	'save_link':'{'btn_ok'|translate}'
{literal}}{/literal}
var page_url = '{''|set_query_html}';
</script>
<script type="text/javascript" src="{$smarty.const.URL_JS}/inline_edit_printform.js"></script>
{/if}
</head>
<body{if !$strict} onload="Printform.init('inline_edit');"{/if}>
{include file="print_button.html"}
{*relative path from frontend*}
<table cellpadding="20" cellspacing="0" width="90%" border="0"
	class="printList">
	<tr>
		<td class="">
		{if $smarty.const.CONF_PRINTFORM_COMPANY_LOGO}
		<h1><img src="{$smarty.const.URL_IMAGES}/{$smarty.const.CONF_PRINTFORM_COMPANY_LOGO}"/></h1>
		{else}
		<h1><img src="{$smarty.const.URL_IMAGES}/companyname.gif"/></h1>
		{/if}
		
		<div class="grey">
		<p class="strongtext">{$smarty.const.CONF_SHOP_NAME|escape:'html'}</p>
		{if $COMPANYNAME}<p class="strongtext">{$COMPANYNAME}</p>{/if}
		{if $COMPANYADDRESS}<p>{$COMPANYADDRESS}</p>{/if}
		{if $COMPANYPHONE}<p>{$smarty.const.PRINTFORMS_INVOICE_PHONE}:&nbsp;{$COMPANYPHONE}</p>{/if}
		<br/>
		<p class="urllinks"><span><a href="{$store_url}">{$store_url}</a><br />
		<a href="mailto:{$smarty.const.CONF_GENERAL_EMAIL}">{$smarty.const.CONF_GENERAL_EMAIL}</a></span></p>
		</div>
		</td>
	</tr>
	<tr>
		<td>
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			class="invoiceHeader">
			<tr>
				<td class="w1">{lbl_pgn_invoice}:</td>
				<td class="invNum inline_edit">{$order.orderID_view|default:"&nbsp;"}</td>
				<td class="w1 strongtext inline_edit">{$order.date_print|default:"&nbsp;"}</td>
			</tr>
			<tr>
				<td class="w1">{lbl_ord_bill_to}:</td>
				<td class="middeltext greytext">
				{if $customer.company}<p class="inline_edit">{$customer.company|htmlsafe:true:true}</p>{else}
				<p class="inline_edit">{$order.billing_name|htmlsafe:true:true}</p>
				{/if}
				{if $order.billing_address}<p class="inline_edit">{$order.billing_address|htmlsafe:true:true}</p>{/if}
				
				<p class="inline_edit">{if $order.billing_state}{$order.billing_state|htmlsafe:true:true},&nbsp;{/if}
{if $order.billing_city}{$order.billing_city|htmlsafe:true:true},&nbsp;{/if}
{if $order.billing_zip}{$order.billing_zip|htmlsafe:true:true}{/if}</p>
				</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td class="w1">{lbl_ord_ship_to}:</td>
				<td class="middeltext greytext">
				{if $customer.company}<p class="inline_edit">{$customer.company|htmlsafe:true:true}</p>{else}
				<p class="inline_edit">{$order.shipping_name|htmlsafe:true:true}</p>
				{/if}
				{if $order.shipping_address}<p class="inline_edit">{$order.shipping_address|htmlsafe:true:true}</p>{/if}
				
				<p class="inline_edit">{if $order.shipping_state}{$order.shipping_state|htmlsafe:true:true},&nbsp;{/if}
{if $order.shipping_city}{$order.shipping_city|htmlsafe:true:true},&nbsp;{/if}
{if $order.shipping_zip}{$order.shipping_zip|htmlsafe:true:true}{/if}</p>
				</td>
				<td>&nbsp;</td>
			</tr>

		</table>

		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			class="invoiceDecsr">
			<tr>
				<th>&nbsp;</th>
				<th class="lefttext">{lbl_str_description}</th>
				<th>{lbl_cart_product_quantity}</th>
				<th>{lbl_str_price}</th>
			</tr>
{foreach from=$order_content item=order_item key=id}			
			<tr class="odd">
				<td>{$id+1}</td>
				<td class="lefttext inline_edit">{$order_item.name|htmlsafe:true:true|default:"&nbsp;"}</td>
				<td>{$order_item.Quantity|string_format:"%d"}</td>
				<td class="nobr">{$order_item.PriceToShow}</td>
			</tr>
{/foreach} 
{assign var=class value='total'}
{if $order.order_discount}
			<tr class="{$class}">
				<td>&nbsp;</td>
				<td class="lefttext">{"usr_custinfo_group_discount"|transcape}{$order.order_discount_percent|string_format:', %0.1f%%'}</td>
				<td>&nbsp;</td>
				<td align="right">{$order.order_discount_valueToShow}</td>
			</tr>
{assign var=class value='odd'}			
{/if}
{if $order.shipping_cost}
			<tr class="{$class}">
				<td>&nbsp;</td>
				<td class="lefttext">{"ordr_shipping_handling_cost"|transcape} ({$order.shipping_type|htmlsafe:true:true|default:"&mdash;"})</td>
				<td>&nbsp;</td>
				<td class="nobr">{$order.shipping_costToShow}</td>
			</tr>
{assign var=class value='odd'}			
{/if}
{if $order.tax}
			<tr class="{$class}">
				<td>&nbsp;</td>
				<td class="lefttext">{"ordr_tax"|translate}</td>
				<td>&nbsp;</td>
				<td class="nobr">{$order.tax_toShow}</td>
			</tr>
{/if}
			<tr class="total">
				<td>&nbsp;</td>
				<td class="strongtext lefttext">{"str_total"|translate}</td>
				<td>&nbsp;</td>
				<td class="totalPrice">{$order.order_amountToShow}</td>
			</tr>
		</table>

		</td>
	</tr>
	<tr>
		<td>
		<div class="grey">
		<table border="0" cellpadding="0" cellspacing="0"
			class="invoiceHeader" width="100%">
			<tr>
				<td>&nbsp;</td>
				<td class="w2">{lbl_payment}:</td>
				<td class="middeltext greytext inline_edit">{$order.payment_type|htmlsafe:true:true|default:"&nbsp;"}</td>
			</tr>

			<tr>
				<td>&nbsp;</td>
				<td class="w2">{lbl_ord_date_paid}:</td>
				<td class="middeltext greytext inline_edit">{$order.paid_date}</td>
			</tr>
		</table>
		</div>
		</td>
	</tr>
</table>
</body>
</html>
